#This Dockerfile uses the sshd ubuntu image
#VERSION 1 - EDITION 1
#Author: kyo
#Command Format: Instruction [arguments / command] ..

#基于ubuntu16.04官方镜像
FROM ubuntu:18.04

MAINTAINER kyo iprintf@qq.com

# 中文支持
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8

# 配置时区
ENV TZ=Asia/Shanghai
COPY Shanghai /usr/share/zoneinfo/$TZ
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

#18.04阿里源
COPY sources.list /etc/apt/

#更新源及安装必备工具
RUN apt-get update  \
    && apt-get install -y tmux git vim ctags gawk id-utils \
                          xclip sudo net-tools inetutils-ping
# 创建用户
RUN useradd kyo -u 1000 -G root,sudo -m -U -s /bin/bash     \
    -p '$6$C2EfMTbT$2D8qRejp8Pnmo7SkqrCIWSjzmTdliIZ/QEHkbrzIrnH5nvOCZrahYV4oOaEjKhEl1k7T4yI802.8BUpuGCOKv1'

# 复制配置文件目录
COPY config /config

# 权限设置
RUN chown kyo:root /config -R && chmod +x /config/start

# 删除多余文件
RUN rm /core -f

#设置自启动命令
CMD ["/config/start"]

